using CastleInterceptorDemo.Api.Applications;
using Microsoft.AspNetCore.Mvc;

namespace CastleInterceptorDemo.Api.Controllers;

[ApiController]
[Route("[controller]")]
public class OrderController : ControllerBase
{
    private readonly IOrderAppService _orderAppService;

    public OrderController(IOrderAppService orderAppService)
    {
        _orderAppService = orderAppService;
    }

    [HttpGet]
    public async Task<int> Get(int id)
    {
        return await _orderAppService.GetOrder(id);
    }
}
